//
//  BDChatMessageLayout.h
//  iOS_beboy
//
//  Created by wen on 2018/1/31.
//  Copyright © 2018年 com.8xiong. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <JMessage/JMessage.h>

#define KChatAvatarSize 50
#define KChatAvatarTop 10
#define KChatAvatarHorizontalMargin 10
#define KChatBubbleTopMargin 10
#define KChatBubbleBottomMargin 10
#define KChatBubbleHorizontalMaxMargin 20
#define KChatBubbleHorizontalMinMargin 10

#define kChatUserNameFontSize 14
#define kChatUserNameColor UIColorHex(333333)

#define kChatMessageFontSize 14
#define kChatMessageColor UIColorHex(333333)

#define kChatContentMaxWidth (kBDScreenWidth - KChatAvatarSize - KChatAvatarHorizontalMargin - KChatAvatarSize - KChatAvatarHorizontalMargin)
#define kChatMessageTextMaxWidth (kChatContentMaxWidth - KChatBubbleHorizontalMaxMargin - KChatBubbleHorizontalMinMargin)

@interface BDChatMessageLayout : NSObject

- (instancetype)initWithMessage:(JMSGMessage *)message;

@property (nonatomic, strong) JMSGMessage *message;

@property (nonatomic) CGFloat contentHeight;
@property (nonatomic) CGFloat height;

@property (nonatomic) CGFloat messageHeight;
@property (nonatomic, strong) YYTextLayout *textMessageLayout;

@end
